Neurostimulation systems with event pattern detection and classification

ABSTRACT

Systems, devices, and methods for electrically stimulating peripheral nerve(s) to treat various disorders are disclosed, as well as signal processing systems and methods for enhancing device monitoring protocols and detecting abnormal patient usage of the device.

REFERENCE TO RELATED APPLICATIONS

This application claims the benefit under 35 U.S.C. § 119(e) as a nonprovisional application of U.S. Provisional App. Nos. 62/910,260 filed on Oct. 3, 2019, and 62/933,816 filed on Nov. 11, 2019, each of the foregoing of which are incorporated by reference in their entireties.

BACKGROUND Field of the Invention

Embodiments of the invention relate generally to systems, devices, and methods for stimulating nerves, and more specifically relate to system, devices, and methods for electrically stimulating peripheral nerve(s) to treat various disorders, as well as signal processing systems and methods for enhancing device monitoring protocols and detecting abnormal patient usage of the device.

Description of the Related Art

A wide variety of modalities can be utilized to neuromodulate peripheral nerves. For example, electrical energy can be delivered transcutaneously via electrodes on the skin surface with neurostimulation systems to stimulate peripheral nerves, such as the median, radial, and/or ulnar nerves in the upper extremities; the tibial, saphenous, and/or peroneal nerve in the lower extremities; or the auricular vagus, tragus, trigeminal or cranial nerves on the head or ear, as non-limiting examples. Stimulation of these nerves has been shown to provide therapeutic benefit across a variety of diseases, including but not limited to movement disorders (including but not limited to essential tremor, Parkinson's tremor, orthostatic tremor, and multiple sclerosis), urological disorders, gastrointestinal disorders, cardiac diseases, and inflammatory diseases, mood disorders (including but not limited to depression, bipolar disorder, dysthymia, and anxiety disorder), pain syndromes (including but not limited to migraines and other headaches, trigeminal neuralgia, fibromyalgia, complex regional pain syndrome), among others. A number of conditions, such as tremors, can be treated through some form of transcutaneous, percutaneous, or other implanted forms of peripheral nerve stimulation. Wearable systems with compact, ergonomic form factors are needed to enhance efficacy, compliance, and comfort with using the devices.

SUMMARY

In some embodiments, disclosed herein is a neuromodulation device according to any one or more of the embodiments described in the disclosure.

Also disclosed herein are systems and/or methods for determining or predicting device malfunction and/or abnormal patient usage according to any one or more of the embodiments described in the disclosure.

In some embodiments, patient-device interaction and/or device function can be monitored in real-time or near real-time.

In some embodiments, patient usage patterns can be automatically detected to inform patient-oriented assistance or device diagnostics.

Further disclosed herein are systems and/or methods for predicting a response to therapy or lack thereof, according to any one or more of the embodiments described in the disclosure.

In some embodiments, disclosed herein is a wearable neurostimulation device for transcutaneously stimulating one or more peripheral nerves of a user. The device can include one or more electrodes configured to generate electric stimulation signals; one or more sensors configured to detect motion signals, wherein the one or more sensors are operably connected to the wearable neurostimulation device; and/or one or more hardware processors configured to receive raw signals relating to device interaction events; store the device interaction events into a data log; perform an anomalous sequence detection analysis on entries of the data log; perform an event sequence classification on entries of the data log; determine at least one of an anomaly type and/or an anomaly score; and/or determine anomalous device function patterns or device usage patterns.

In some embodiments, the sensors are operably attached to the wearable neurostimulation device.

In some embodiments, the anomalous sequence detection analysis comprises utilizing Markov chains.

In some embodiments, the Markov chains comprise modified continuous time Markov chains.

In some embodiments, the anomalous sequence detection analysis comprises converting a time interval into a time bin on a logarithmic scale.

In some embodiments, the anomalous sequence detection analysis comprises estimating the influence of null count events on probability calculations.

In some embodiments, the device further comprises one or more end effectors configured to generate stimulation signals other than electric stimulation signals.

In some embodiments, the stimulation signals other than electric stimulation signals are vibrational stimulation signals.

In some embodiments, the sensors comprise one or more of a gyroscope, accelerometer, and magnetometer.

In some embodiments, the anomalous sequence detection analysis comprises identifying a sequence of button presses.

In some embodiments, the anomalous sequence detection analysis comprises identifying patient early termination of therapy.

In some embodiments, disclosed herein is a neuromodulation device for modulating one or more nerves of a user, the device comprising one or more electrodes configured to generate electric signals; one or more sensors configured to detect motion signals, wherein the one or more sensors are operably connected to the device; and one or more hardware processors configured to: receive raw signals relating to device interaction events; store the device interaction events into a data log; perform an anomalous sequence detection analysis on entries of the data log; perform an event sequence classification on entries of the data log; determine at least one of an anomaly type and/or an anomaly score; and determine anomalous device function patterns or device usage patterns.

In some embodiments, the neuromodulation is stimulatory.

In some embodiments, the neuromodulation is inhibitory.

In some embodiments, the neuromodulation is partially stimulatory and partially inhibitory.

In some embodiments, the device is wearable.

In some embodiments, the device is a non-wearable.

In some embodiments, the device is a band for the wrist.

In some embodiments, the device is a band for a limb.

In some embodiments, the device is a patch.

In some embodiments, the device is partially or completely transcutaneous.

In some embodiments, the nerves are one or more peripheral nerves.

In some embodiments, the nerves are located on or near a wrist, an arm, an ankle, a leg, or an ear.

In some embodiments, the sensors are operably attached to the device.

In some embodiments, the anomalous sequence detection analysis comprises utilizing Markov chains.

In some embodiments, the Markov chains comprise modified continuous time Markov chains.

In some embodiments, the anomalous sequence detection analysis comprises converting a time interval into a time bin on a logarithmic scale.

In some embodiments, the anomalous sequence detection analysis comprises estimating the influence of null count events on probability calculations.

In some embodiments, a device further comprises one or more end effectors configured to generate signals other than electric signals.

In some embodiments, a device further comprises one or more end effectors configured to generate signals other than electric signals, wherein said other signals include vibration.

In some embodiments, the sensors comprise one or more of a gyroscope, accelerometer, and magnetometer.

In some embodiments, the anomalous sequence detection analysis comprises identifying a sequence of button presses.

In some embodiments, the anomalous sequence detection analysis comprises identifying patient early termination of therapy.

In some embodiments, disclosed herein is a neuromodulation device, comprising any one or more of the embodiments described in the disclosure.

In some embodiments, a system for determining or predicting device malfunction and/or abnormal patient usage can comprise, consist essentially of, consist of, or not comprise any one or more of the embodiments described in the disclosure.

In some embodiments, a method for determining or predicting device malfunction and/or abnormal patient usage, can comprise, consist essentially of, consist of, or not comprise any one or more of the embodiments described in the disclosure.

The embodiments described herein that, for example, determine or predict device malfunction and/or abnormal patient usage of a neuromodulation system can have one or more of the following advantages: (i) greater therapeutic benefit with improved reliability and patient satisfaction (e.g., from detecting events in advance of actual device malfunction, and contacting the patient in advance for replacement, repair, and/or patient education); (ii) decreased device error alerts and interruptions in therapy (and thus delays in completing a therapy session); (iii) increased likelihood of patient compliance due to the foregoing; (iv) determining whether patient compliance with therapy or device anomalies need to be addressed if efficacy of treatment is not as expected; (v) correlate clinical ratings of medical conditions, e.g., tremor severity can correlate with simultaneous measurements of wrist motion using inertial measurement units (IMUs); and/or (vi) correlate symptoms or other features extracted from sensors to provide characteristic information about disease phenotypes that may be leveraged to improve diagnosis, prognosis, and/or therapeutic outcomes.

In some of the embodiments described herein, one, several or all of the following features are not included: (i) sensors configured to assess patient motion and/or collect motion data, (ii) accelerometers, gyroscopes, magnetometers, inertial measurement units. and (iii) EMG or other muscle sensors. In some embodiments, systems and methods are not configured for, or are not placed on the upper arm and/or are not configured for neuromodulation on the skin surface of the forehead. In some embodiments, systems and methods are not configured to, or do not modulate descending (e.g., efferent) nerve pathways, and only modulate ascending (e.g., afferent) nerve pathways. In some embodiments, systems and methods are not configured to, or do not modulate nerves only on the ventral side of the wrist. In some embodiments, systems and methods do not include any implantable components. In some embodiments, systems and methods are not configured for percutaneous or subcutaneous stimulation, and are only configured for transcutaneous neuromodulation. In some embodiments, systems and methods are not configured for only neuromodulating, e.g., stimulating the ventral side of the wrist, rather some configurations may neuromodulate, e.g., deliver stimulation between two or more of the ventral, dorsal, and/or lateral sides of the wrist to target the medial nerve.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A illustrates a block diagram of an example neuromodulation (e.g., neurostimulation) device.

FIG. 1B illustrates a block diagram of an embodiment of a controller that can be implemented with the hardware components described with respect to FIG. 1A.

FIG. 1C schematically illustrates an embodiment of a neuromodulation device and base station.

FIG. 2 illustrates a block diagram of an embodiment of a controller that can be implemented with the hardware components described with respect to FIG. 1A or 1B.

FIG. 3 is a table matrix indicating various non-limiting advantages of systems and methods as disclosed herein according to some embodiments, including in the customer success, clinical, R&D, and data science areas.

FIG. 4 illustrates a schematic illustrating examples of system and method functionality of some embodiments.

FIG. 5 illustrates a schematic indicating how device log analysis algorithms can be utilized to detect and classify anomalous events, utilizing a controller configured for anomalous sequence detection and event sequence classification as disclosed elsewhere herein.

FIGS. 6A to 6D schematically illustrates example results using ASDA, including device log data over time that can be utilized to calculate an anomaly score and detect a type of anomaly.

FIG. 7 schematically illustrates scatter plot results for a set of patients, and also measuring an anomaly score.

FIG. 8A schematically illustrates a therapy session using a neuromodulation device, with corresponding device log events over time.

FIG. 8B illustrates example data collection sequence with event markers.

FIG. 8C illustrates example data collections sequence with event markers and corresponding time stamps.

FIG. 9A schematically illustrates a device log event sequence model, including continuous time Markov chains in bar graph form.

FIG. 9B illustrates example transition probabilities between events and particular event sequences.

FIG. 9C illustrates a visual representation of an array of numbers representing a probability model.

FIG. 9D illustrates a formula that is used to calculate an anomaly score for a particular sequence of events.

FIG. 9E shows a snippet of an example event log with time stamps and corresponding event markers.

FIG. 9F shows calculated anomaly scores over time of two patients.

FIG. 9G illustrates a heat map of patients and corresponding anomaly scores over time.

FIG. 10 schematically illustrates a bar graph illustrating identification of events associated with unusual interactions.

FIG. 11 illustrates two types of sequences that can be grouped together.

FIG. 12 an example of an unsupervised neural network.

FIG. 13 illustrates an embodiment of encoding a particular sequence in format that is suitable for training.

FIG. 14 illustrates an example output of an unsupervised neural network and sequences that are grouped together for a particular neuron.

FIG. 15 illustrates another example output of an unsupervised neural network and further illustrates sequences of neighboring neurons.

FIG. 16 illustrates mapping of anomaly scores to the output of the unsupervised neural network.

FIG. 17 illustrates mapping of new log sequences on the output of the unsupervised neural network.

FIG. 18 illustrates example patient log sequences mapped on to the output of the unsupervised neural network.

FIG. 19 illustrates selected clusters from FIG. 18 with corresponding anomaly scores.

FIG. 20 illustrates a determination of specific anomalies for the selected clusters.

FIG. 21 illustrates example recommendations that can be sent to users.

DETAILED DESCRIPTION

Disclosed herein are devices configured for providing neuromodulation (e.g., neurostimulation). The neuromodulation (e.g., neurostimulation) devices provided herein may be configured to stimulate peripheral nerves of a user. The neuromodulation (e.g., neurostimulation) devices may be configured to transcutaneously transmit one or more neuromodulation (e.g., neurostimulation) signals across the skin of the user. In many embodiments, the neuromodulation (e.g., neurostimulation) devices are wearable devices configured to be worn by a user. The user may be a human, another mammal, or other animal user. The neuromodulation (e.g., neurostimulation) system could also include signal processing systems and methods for enhancing diagnostic and therapeutic protocols relating to the same. In some embodiments, the neuromodulation (e.g., neurostimulation) device is configured to be wearable on an upper extremity of a user (e.g., a wrist, forearm, arm, and/or finger(s) of a user). In some embodiments, the device is configured to be wearable on a lower extremity (e.g., ankle, calf, knee, thigh, foot, and/or toes) of a user. In some embodiments, the device is configured to be wearable on the head or neck (e.g., forehead, ear, neck, nose, and/or tongue). In several embodiments, dampening or blocking of nerve impulses and/or neurotransmitters are provided. In some embodiments, nerve impulses and/or neurotransmitters are enhanced. In some embodiments, the device is configured to be wearable on or proximate an ear of a user, including but not limited to auricular neuromodulation (e.g., neurostimulation) of the auricular branch of the vagus nerve, for example. The device could be unilateral or bilateral, including a single device or multiple devices connected with wires or wirelessly.

Systems with compact, ergonomic form factors are needed to enhance efficacy, compliance, and/or comfort when using non-invasive or wearable neuromodulation devices. In several embodiments, neuromodulation systems and methods are provided that enhance or inhibit nerve impulses and/or neurotransmission, and/or modulate excitability of nerves, neurons, neural circuitry, and/or other neuroanatomy that affects activation of nerves and/or neurons. For example, neuromodulation (e.g., neurostimulation) can include one or more of the following effects on neural tissue: depolarizing the neurons such that the neurons fire action potentials; hyperpolarizing the neurons to inhibit action potentials; depleting neuron ion stores to inhibit firing action potentials; altering with proprioceptive input; influencing muscle contractions; affecting changes in neurotransmitter release or uptake; and/or inhibiting firing.

In some embodiments, wearable systems and methods as disclosed herein can advantageously be used to identify whether a treatment is effective in significantly reducing or preventing a medical condition, including but not limited to tremor severity. Wearable sensors can advantageously monitor, characterize, and aid in the clinical management of hand tremor as well as other medical conditions including those disclosed elsewhere herein. Not to be limited by theory, clinical ratings of medical conditions, e.g., tremor severity can correlate with simultaneous measurements of wrist motion using inertial measurement units (IMUs). For example, tremor features extracted from IMUs at the wrist can provide characteristic information about tremor phenotypes that may be leveraged to improve diagnosis, prognosis, and/or therapeutic outcomes. Kinematic measures can correlate with tremor severity, and machine learning algorithms incorporated in neuromodulation systems and methods as disclosed for example herein can predict the visual rating of tremor severity.

A challenge for bioelectronic and other therapies is ensuring devices are functioning normally and the patient is correctly interacting with the device. This can require in some cases real time or near real time monitoring of device function and patient-device interactions. When abnormal patient-usage or device function patterns are detected, appropriate actions can be required to minimize the impact on the patient's therapy. This is especially advantageous for prescription therapies, where interruptions to the therapy can potentially significantly impact the outcome.

Automated event log analysis can be challenging, because it requires identifying and classifying patterns in the device log events. These device logs may not be regularly occurring in time, but rather separated by any time interval. Systems and methods can be configured to analyze device-user interactions to inform device and user-specific decisions.

Neuromodulation Device

FIG. 1A illustrates a block diagram of an example neuromodulation (e.g., neurostimulation) device 100. The device 100 includes multiple hardware components which are capable of, or programmed to provide therapy across the skin of the user. As illustrated in FIG. 1A, some of these hardware components may be optional as indicated by dashed blocks. In some instances, the device 100 may only include the hardware components that are required for stimulation therapy. The hardware components are described in more detail below.

The device 100 can include two or more effectors, e.g. electrodes 102 for providing neurostimulation signals. In some instances, the device 100 is configured for transcutaneous use only and does not include any percutaneous or implantable components. In some embodiments, the electrodes can be dry electrodes. In some embodiments, water or gel can be applied to the dry electrode or skin to improve conductance. In some embodiments, the electrodes do not include any hydrogel material, adhesive, or the like.

The device 100 can further include stimulation circuitry 104 for generating signals that are applied through the electrode(s) 102. The signals can vary in frequency, phase, timing, amplitude, or offsets. The device 100 can also include power electronics 106 for providing power to the hardware components. For example, the power electronics 106 can include a battery.

The device 100 can include one or more hardware processors 108. The hardware processors 108 can include microcontrollers, digital signal processors, application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. In an embodiment, all of the processing discussed herein is performed by the hardware processor(s) 108. The memory 110 can store data specific to patient and rules as discussed below.

In the illustrated figure, the device 100 can include one or more sensors 112. As shown in the figure, the sensor(s) 112 may be optional. Sensors could include, for example, biomechanical sensors configured to, for example, measure motion, and/or bioelectrical sensors (e.g., EMG, EEG, and/or nerve conduction sensors). Sensors can include, for example, cardiac activity sensors (e.g., ECG, PPG), skin conductance sensors (e.g., galvanic skin response, electrodermal activity), and motion sensors (e.g., accelerometers, gyroscopes). The one or more sensors 102 may include an inertial measurement unit (IMU).

In some embodiments, the IMU can include one or more of a gyroscope, accelerometer, and magnetometer. The IMU can be affixed or integrated with the neuromodulation (e.g., neurostimulation) device 100. In an embodiment, the IMU is an off the shelf component. In addition to its ordinary meaning, the IMU can also include specific components as discussed below. For example, the IMU can include one more sensors capable of collecting motion data. In an embodiment, the IMU includes an accelerometer. In some embodiments, the IMU can include multiple accelerometers to determine motion in multiple axes. Furthermore, the IMU can also include one or more gyroscopes and/or magnetometer in additional embodiments. Since the IMU can be integrated with the neurostimulation device 100, the IMU can generate data from its sensors responsive to motion, movement, or vibration felt by the device 100. Furthermore, when the device 100 with the integrated IMU is worn by a user, the IMU can enable detection of voluntary and/or involuntary motion of the user.

The device 100 can optionally include user interface components, such as a feedback generator 114 and a display 116. The display 116 can provide instructions or information to users relating to calibration or therapy. The display 116 can also provide alerts, such an indication of response to therapy, for example. Alerts may also be provided using the feedback generator 114, which can provide haptic feedback to the user, such as upon initiation or termination of stimulation, for reminder alerts, to alert the user of a troubleshooting condition, to perform a tremor inducing activity to measure tremor motion, among others. Accordingly, the user interface components, such as the feedback generator 114 and the display 116 can provide audio, visual, and haptic feedback to the user.

Furthermore, the device 100 can include communications hardware 118 for wireless or wired communication between the device 100 and an external system, such as the user interface device discussed below. The communications hardware 118 can include an antenna. The communications hardware 118 can also include an Ethernet or data bus interface for wired communications.

While the illustrated figure shows several components of the device 100, some of these components are optional and not required in all embodiments of the device 100. In some embodiments, a system can include a diagnostic device or component that does not include neuromodulation functionality. The diagnostic device could be a companion wearable device connected wirelessly through a connected cloud server, and include, for example, sensors such as cardiac activity, skin conductance, and/or motion sensors as described elsewhere herein.

In some embodiments, the device 100 can also be configured to deliver one, two or more of the following: magnetic, vibrational, mechanical, thermal, ultrasonic, or other forms of stimulation instead of, or in addition to electrical stimulation. Such stimulation can be delivered via one, two, or more effectors in contact with, or proximate the skin surface of the patient. However, in some embodiments, the device is configured to only deliver electrical stimulation, and is not configured to deliver one or more of magnetic, vibrational, mechanical, thermal, ultrasonic, or other forms of stimulation.

Although several neurostimulation devices are described herein, in some embodiments nerves are modulated non-invasively to achieve neuro-inhibition. Neuro-inhibition can occur in a variety of ways, including but not limited to hyperpolarizing the neurons to inhibit action potentials and/or depleting neuron ion stores to inhibit firing action potentials. This can occur in some embodiments via, for example, anodal or cathodal stimulation, low frequency stimulation (e.g., less than about 5 Hz in some cases), or continuous or intermediate burst stimulation (e.g., theta burst stimulation). In some embodiments, the wearable devices have at least one implantable portion, which may be temporary or more long term. In many embodiments, the devices are entirely wearable and non-implantable.

User Interface Device

FIG. 1B illustrates communications between the neurostimulation device 100 and a user interface device 150 over a communication link 130. The communication link 130 can be wired or wireless. The neuromodulation (e.g., neurostimulation) device 100 is capable of communicating and receiving instructions from a user interface device 150. The user interface device 150 can include a computing device. In some embodiments, the user interface device 150 is a mobile computing device, such as a mobile phone, a smartwatch, a tablet, or a wearable computer. The user interface device 150 can also include server computing systems that are remote from the neurostimulation device. The user interface device 150 can include hardware processor(s) 152, a memory 154, display 156, and power electronics 158. In some embodiments, a user interface device 150 can also include one or more sensors, such as sensors described elsewhere herein. Furthermore, in some instances, the user interface device 150 can generate an alert responsive to device issues or a response to therapy. The alert may be received from the neurostimulation device 100.

In additional embodiments, data acquired from the one or more sensors 102 is processed by a combination of the hardware processor(s) 108 and hardware processor(s) 152. In further embodiments, data collected from one or more sensors 102 is transmitted to the user interface device 150 with little or no processing performed by the hardware processors 108. In some embodiments, the user interface device 150 can include a remote server that processes data and transmits signals back to the device 100 (e.g., via the cloud).

FIG. 1C schematically illustrates a neuromodulation device and base station. The device can include a stimulator and detachable band including two or more working electrodes (positioned over the median and radial nerves) and a counter-electrode positioned on the dorsal side of the wrist. The electrodes could be, for example, dry electrodes or hydrogel electrodes. The base station can be configured to stream movement sensor and usage data on a periodic basis, e.g., daily and charge the device. The device stimulation bursting frequency can be calibrated to a lateral postural hold task “wing-beating”or forward postural hold task for a predetermined time, e.g., 20 seconds for each subject. Other non-limiting examples of device parameters can be as disclosed elsewhere herein.

In some embodiments, stimulation may alternate between each nerve such that the nerves are not stimulated simultaneously. In some embodiments, all nerves are stimulated simultaneously. In some embodiments, stimulation is delivered to the various nerves in one of many bursting patterns. The stimulation parameters may include on/off, time duration, intensity, pulse rate, pulse width, waveform shape, and the ramp of pulse on and off. In one preferred embodiment the pulse rate may be from about 1 to about 5000 Hz, about 1 Hz to about 500 Hz, about 5 Hz to about 50 Hz, about 50 Hz to about 300 Hz, or about 150 Hz. In some embodiments, the pulse rate may be from 1 kHz to 20 kHz. A preferred pulse width may range from, in some cases, 50 to 500 μs (micro-seconds), such as approximately 300 μs. The intensity of the electrical stimulation may vary from 0 mA to 500 mA, and a current may be approximately 1 to 11 mA in some cases. The electrical stimulation can be adjusted in different patients and with different methods of electrical stimulation. The increment of intensity adjustment may be, for example, 0.1 mA to 1.0 mA. In one preferred embodiment the stimulation may last for approximately 10 minutes to 1 hour, such as approximately 10, 20, 30, 40, 50, or 60 minutes, or ranges including any two of the foregoing values. In some embodiments, a plurality of electrical stimuli can be delivered offset in time from each other by a predetermined fraction of multiple of a period of a measured rhythmic biological signal such as hand tremor, such as about ¼, ½, or ¾ of the period of the measured signal for example. Further possible stimulation parameters are described, for example, in U.S. Pat. No. 9,452,287 to Rosenbluth et al., U.S. Pat. No. 9,802,041 to Wong et al., PCT Pub. No. WO 2016/201366 to Wong et al., PCT Pub. No. WO 2017/132067 to Wong et al., PCT Pub. No. WO 2017/023864 to Hamner et al., PCT Pub. No. WO 2017/053847 to Hamner et al., PCT Pub. No. WO 2018/009680 to Wong et al., and PCT Pub. No. WO 2018/039458 to Rosenbluth et al., each of the foregoing of which are hereby incorporated by reference in their entireties.

Controller

FIG. 2 illustrates a block diagram of an embodiment of a controller 200 that can be implemented with the hardware components described above with respect to FIGS. 1A-1C. The controller 200 can include multiple engines for performing the processes and functions described herein. The engines can include programmed instructions for performing processes as discussed herein for detection of input conditions and control of output conditions. The engines can be executed by the one or more hardware processors of the neuromodulation (e.g., neurostimulation) device 100 alone or in combination with the patient monitor 150. The programming instructions can be stored in a memory 110. The programming instructions can be implemented in C, C++, JAVA, or any other suitable programming languages. In some embodiments, some or all of the portions of the controller 200 including the engines can be implemented in application specific circuitry such as ASICs and FPGAs. Some aspects of the functionality of the controller 200 can be executed remotely on a server (not shown) over a network. While shown as separate engines, the functionality of the engines as discussed below is not necessarily required to be separated. Accordingly, the controller 200 can be implemented with the hardware components described above with respect to FIGS. 1A-1C.

The controller 200 can include a signal collection engine 202. The signal collection engine 202 can enable acquisition of raw data from sensors embedded in the device, including but not limited to accelerometer or gyroscope data from the IMU 102. In some embodiments, the signal collection engine 202 can also perform signal preprocessing on the raw data. Signal preprocessing can include noise filtering, smoothing, averaging, and other signal preprocessing techniques to clean the raw data. In some embodiments, portions of the signals can be discarded by the signal collection engine 202.

The controller 200 can also include a feature extraction engine 204. The feature extraction engine 204 can extract relevant features from the signals collected by the signal collection engine 202. The features can be in time domain and/or frequency domain. For example, some of the features can include amplitude, bandwidth, area under the curve (e.g., power), energy in frequency bins, peak frequency, ratio between frequency bands, and the like. The features can be extracted using signal processing techniques such as Fourier transform, band pass filtering, low pass filtering, high pass filtering and the like.

The controller can further include a rule generation engine 206. The rule generation engine 206 can use the extracted features from the collected signals and determine rules that correspond to past, current, imminent, or future device malfunction and/or abnormal patient usage of the device. The rule generation engine 206 can automatically determine a correlation between specific extracted features and device malfunction and/or abnormal patient usage of the device. Device malfunction events can include, for example, poor connection quality, sensor failure, stimulation failure, and others. Abnormal patient usage of the device can include, for example, repetitive or excessive button or other control presses, patient-initiated termination of therapy sessions, anomalous adjustment of stimulation amplitude, and the like.

The device can also identify potential undesirable user experiences using tremor features assessed from kinematic measurements and patient usage logs from the device where undesirable user experiences can include but are not limited to device malfunctions and adverse events such as skin irritation or burn; and predict patient or customer satisfaction (e.g., net promoter score) based on patient response or other kinematic features from measured tremor motion.

FIG. 3 is a table matrix indicating various non-limiting advantages of systems and methods as disclosed herein according to some embodiments, including in the customer success, clinical, R&D, and data science areas. Advantages can include, for example, enhancing patient satisfaction, maximizing clinical trial success, enhancing the user experience, and enhancing product and services. The systems and methods can be utilized to identify which patients are having issues with the device; if the patient is compliant with using the device as recommended; and/or to provide user experience feedback. Systems and methods can also be utilized to identify or predict devices having or will have issues; whether the device is functioning normally to deliver therapy; what errors are occurring in the device; and/or is the device logging data normally. Systems and methods can also be utilized to result in patient contact for a proactive product replacement/upgrade; efficiently identify and fix issues and/or provide patient education; and/or provide accurate insights from the data.

FIG. 4 illustrates a schematic illustrating examples of system and method functionality of some embodiments, which can include analysis of device records, and patient interaction and device events from device logs can be input into a controller in real-time, near real-time, or later in order to personalize assistance for device usage; recommend clinical intervention; recommend different device prescription settings; recommend participation in trials; request device replacement; request firmware upgrades; and inform possible re-designs, for example.

In some embodiments, real-time assessment can be within about 10 seconds, 5 seconds, or 1 second of an event occurring. In some embodiments, near real-time assessment can be within about 24 hours, 12 hours, 6 hours, 3 hours, 2 hours, 1 hour, 45 minutes, 30 minutes, 15 minutes, 10 minutes, 5 minutes, 4 minutes, 3 minutes, 2 minutes, 1 minute, 30 seconds, or 15 seconds of an event occurring, or ranges including any two of the foregoing values.

In some embodiments, monitoring systems and methods can utilize a plurality of engines. Any device log can be used, for example logs of patient-device interactions or internal device function records.

In some embodiments, anomaly detection can be performed via a controller configured to execute an Anomalous Sequence Detection Algorithm (ASDA), which can analyze a set of training device log events to create a model of log patterns, corresponding to the expected pattern. The controller can also be configured to execute an Event Sequence Classification Algorithm (ESCA), which classifies event sequences. This can then be used to identify groups of event sequences corresponding to classes of patterns. Each group of patterns can be automatically inspected, or manually inspected by a trained operator to assign a human-readable label.

Some system advantages, according to several embodiments, include the ability to predict whether a new, previously unobserved sequence of events is unexpected or anomalous according to the model. For example, ASDA can predict the likelihood of observing a new sequence of events, and ESCA classifies which group the new sequence of events belongs to.

As one example, a new sequence of events is predicted to be unlikely during normal use (e.g., probability of less than a certain threshold, such as, for example, about or less than about 1:100, 1:500, 1:1,000, or less) and can be classified to a group of events with a desired label, e.g., the label “device connection error”.

In some embodiments, ASDA involves a Markov chain (e.g., a modified continuous-time Markov chain), and can be configured to model the probability of observing a first event A, then a second event B (as well as subsequent third event C, fourth event D, etc.) at a given time interval. A Markov chain is a stochastic model describing a sequence of possible events in which the probability of each event depends only on the state attained in the previous event. The time interval can be first converted into a time bin on a logarithmic scale (0 s, 1 s, 2 s, 4 s, 8 s, 16 s, etc.). A Laplace or other estimator can then be utilized to minimize the influence of null count events on probability calculations. The likelihood of observing a n-length sequence is the prior probability p(n₀) multiplied by the probability of subsequent event transitions, obtained from the model using, for example, look up or interpolation.

ESCA can involve a collection of short event segments. These segments can be derived from entire event logs that are separated into smaller segments (e.g., segments with 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 events or more or less, or ranges including any two of the foregoing values). The input can be the numerically encoded identifier of each event interleaved by the time bin identity of the log transformed time interval between the surrounding events. Each segment can have a corresponding likelihood which can be calculated by ASDA.

The segments can then be fed into an artificial neural network (e.g., self-organizing map). This is an unsupervised method for classification, and can produce a low-dimensional (e.g., two-dimensional), discretized representation of the input space of the training samples (e.g., map), and perform dimensionality reduction. In some embodiments, the method for classification is not supervised. Self-organizing maps differ from other artificial neural networks as they apply competitive learning as opposed to error-correction learning (such as backpropagation with gradient descent), and in the sense that they use a neighborhood function to preserve the topological properties of the input space. After the model is trained, each neuron in the map can have a corresponding weight, which indicates a specific pattern it detects. It also has a corresponding probability calculated by averaging the ASDA calculated likelihood of the segments that were selected by the neuron. Thus, each neuron and the group it represents is assigned a likelihood.

In some embodiments, patient support and device warranty can be provided. This system can be used to monitor and automatically flag scenarios that needs customer outreach.

Some non-limiting examples include the following. In some embodiments, ASDA indicates patient usage patterns continuously show sequences of button presses that are highly unusual under normal usage. ESCA identifies the button presses are occurring before the start of a therapy session, indicating the patient has difficulty starting a therapy session. This can be communicated remotely to a third party, such as the customer success team for example, which can contact the patient with instructions for using the device correctly. In some embodiments, the system will identify a pattern of button presses, such as, for example, about or at least about 2, 3, 4, 5, 6, 7, 8, 9, 10, or more (or ranges including any of the foregoing values) within a specified time interval, such as, for example, within about 5, 4, 3, 2, or 1 minute, or 30 seconds, 20 seconds, 15 seconds, 10 seconds, 5 seconds, or less (or ranges including any of the foregoing values).

In another embodiment, ASDA and ESCA indicate the device is beginning to malfunction, potentially affecting therapy delivery. A third party, such as a customer success team can be alerted remotely to send a replacement device before actual device failure.

In another embodiment, during development testing/clinical trials, ASDA and ESCA analyze the device logs and identifies unusual sequences associated with a particular event. This can be used to debug and release new updates to device firmware.

Any sequence of events with corresponding timestamps can be processed using the ASDA/ESCA platform into order to provide insight on sequence patterns.

FIG. 5 illustrates a schematic indicating how device log analysis algorithms can be utilized to detect and classify anomalous events, utilizing a controller configured for anomalous sequence detection and event sequence classification as disclosed elsewhere herein. The data can be utilized to determine an anomaly score and/or identify the type of anomaly.

FIGS. 6A-6D schematically illustrates example results using ASDA, including device log data over time that can be utilized to calculate an anomaly score and detect a type of anomaly. Alerts can be transmitted to a third party depending on anomaly score thresholds and/or the type of anomaly, which can include anomalies in measured impedance values, current delivery, tremor frequency values, device or user-aborted stimulation sessions, button or other control presses, and the like.

FIG. 7 schematically illustrates scatter plot results for a set of 161 patients, with the patient number on the Y axis and days from the start of therapy on the X axis vs. the anomaly score (listed as a range of −20 to 20). Normal usage patterns, such as in the lower half of the graph with low anomaly scores indicate that patients do not need to be contacted, while anomalous usage patterns, such as in the upper half of the graph with high anomaly scores indicate that patients may be contacted if anomalous events affect therapy.

FIG. 8A schematically illustrates a therapy session using a neuromodulation device, with corresponding device log events over time, including tremor measurements (e.g., frequency sensing), stimulation starts, stimulation cessations, and patient rating, as well as interruptions, device warnings, patient stopping the therapy, and device adjustments.

FIGS. 8B and 8C illustrate an example of data collection sequence that is used to log device events. As shown in FIG. 8B, the controller 200 can use markers that indicate particular events related to device settings, function, and/or therapy. In some instances, the controller 200 stores these markers with a time stamp as shown in FIG. 8C. The time stamp can correspond to an end or a completion of an event. The completion may refer to a successful or an anomalous end to an event. In some instances, the controller 200 can also store additional data, such as the start time or duration of a particular event. The controller 200 can store these markers along with time stamps in a device log, which may be a text file or other database format.

FIG. 9A schematically illustrates a device log event sequence model, including continuous time Markov chains in bar graph form, and illustrating a gradual reduction in transition probability beyond 2 seconds in time.

FIG. 9B illustrates example transition probabilities between events and particular event sequences. By knowing these probabilities, the controller 200 can identify unusual or abnormal event sequences from device logs that may have thousands of entries. In some instances, the rules for what constitutes an abnormal event sequence is not predetermined. The controller 200 can automatically determine these rules or patterns as will be described in more detail below. The probabilities may also be a function of time in addition to transition between two events.

The log can store data over multiple days and may have only access to certain outcomes. Patterns from these stored logs may not be easily discernable. For example, many patients deal with short stimulation sessions where the device may turn off prematurely. This may be a result of them not wearing the band properly. In some cases, users may be performing some steps, but not all, such as skipping certain measurement steps. These measurement steps may be important in a clinical trial. Accordingly, the embodiments described herein enable early intervention by identifying certain patterns from the device log. These patterns may not be easily identifiable based on visual inspection of the device log. Identifying these patterns can improve treatment and the use of neurostimulation device.

FIG. 9C illustrates a visual representation of an array of numbers representing a probability model. The probabilities can be stored as a function of current event, next event and the time elapsed between the current event and the next event. Accordingly, for any sequence in the log data, the probability between two events based on the elapsed time can be determined from this stored Markov model. Probabilities can also be multiplied together based on combining multiple events.

FIG. 9D illustrates a formula that is used to calculate an anomaly score for a particular sequence of events based on the Markov model illustrated in FIG. 9C. The anomaly score is related to a logarithm of the likelihood of a particular event sequence normalized by that event occurring just by chance. A score of zero or less based on the illustrated formula indicates that the event was expected. In contrast, a score that is greater than zero indicates that the event is abnormal. While the specific calculation of the anomaly score is illustrated, other calculation models can be used. The anomaly score represents the degree of deviation from expectation of a particular event transition.

FIG. 9E shows a snippet of an example event log with time stamps and corresponding event markers. The event log can be broken up in groups of event sequences. In the illustrated embodiment, a group size of seven is selected. Other group sizes can also be used. The controller 200 can divide the entire event log into groups based on the selected size. For each group, the controller 200 can calculate an anomaly score.

FIG. 9F shows calculated anomaly scores over time for two patients. The first patient has more peaks greater than 0, which indicates that Patient 1 has an unusual usage of the device as compared to Patient 2, who has less peaks greater than 0.

FIG. 9G illustrates a heat map of patients and corresponding anomaly scores over time. Some patients show high anomaly score from early usage and that is consistent over several days (see for example, patients in the range of 100-150). In some instances, the controller 200 can automatically determine that the patients with continuous anomalous patterns should be prioritized for contact.

FIG. 10 schematically illustrates a bar graph illustrating identification of events associated with unusual interactions (e.g., patient-initiated cessation of therapy, device interruptions and warnings, etc.), resulting in an increased anomaly score.

In some instances, there could be thousands of patients using the neurostimulation device. It may be very difficult to call them all if there are issues with their use of the neurostimulation device. Accordingly, the controller 200 can identify which patients need attention. The controller 200 can identify unusual patterns. These patterns are very difficult to ascertain manually through visual inspection. The logs can be very long with thousands of entries per patient and thousands of patients monitored at any given time. Furthermore, the patterns are not consistent or easily identifiable. There could be variations in both time and sequences. Accordingly, it may be difficult to group patterns through visual inspection. FIG. 11 illustrates two types of sequences that can be grouped together. The first two sequences are similar and the bottom two sequences are similar to each other. An example process for determining these groupings of sequences automatically is described below.

In some instances, an unsupervised neural network as seen in FIG. 12 can be used to identify patterns. Other type of classification algorithms include clustering (k-means, Expectation Maximization and Hierarchical Clustering), ensemble methods (Classification and Regression Tree variants and Boosting), instance-based (k-Nearest Neighbor, Self-Organizing Maps and Support Vector Machines), regularization (Elastic Net, Ridge Regression and Least Absolute Shrinkage Selection Operator), and dimensionality reduction (Principal Component Analysis variants, Multidimensional Scaling, Discriminant Analysis variants and Factor Analysis).

Prior to using any classification scheme discussed above, the controller 200 may need to encode data in a format that is usable by a particular classifier. Input to the detection and classification algorithm can include, numerically transformed and untransformed device logging descriptions, associated timestamps and additional metadata. FIG. 13 illustrates an example of how to encode a particular sequence in a format that is suitable for training a classifier. The problem of encoding sequence of markers separated by time can be challenging. In the illustrated embodiment, the encoding is done in two parts. First, the events from the sequence are collected and encoded using one hot encoding method. This can convert the markers in the sequence into numbers. In the second part, the time stamps can be encoded. The time can be encoded using normalization in a log scale, divided into intervals, and scaled from 0 to 1. Other variations of transformation can also be used. For example, transformation can be achieved using a combination of nominal (One Hot, N-grams, Bag-of-words, Vector semantics, Term Frequency, Inverse Frequency, Embedding, Mean, binary, or hashing) and ordinal (logarithmic, custom mathematical function based, normalized to predefined numerical range, or standardized to population statistics). Input features can also be transformed using dimensionality reduction methods (Principal Component Analysis variants, Multidimensional Scaling, Discriminant Analysis variants and Factor Analysis). Combinations and permutations of previous transformation methods can be used to create additional derived inputs based on raw inputs.

FIGS. 14 and 15 illustrate an example output of the neural network representing a trained map. Each coordinate corresponds to a particular neuron and each neuron can correspond to grouping of sequences that are similar. As shown in FIG. 14 , the neuron 12-10 has grouped similar sequences together. FIG. 15 shows sequences of neighboring neurons and their corresponding similarities. Thousands of sequences are grouped together based on their similarities by an application of an unsupervised neural network.

FIG. 16 illustrates how the output of the neural network can be used to map anomaly scores. As discussed above, each neuron corresponds to a group of similar sequences. For each of the sequences, the anomaly score can be calculated using the formula illustrated in FIG. 9D. The anomaly score can be averaged for all the sequences associated with a particular neuron and assigned to the particular neuron.

FIG. 17 shows how new log sequences can be mapped on the trained map. For example, the controller 200 can identify which neuron in the trained map corresponds closest to the new sequence. Based on the identification, new sequences can be plotted on the trained map.

FIG. 18 shows example patient sequences mapped on to the trained map. As illustrated, patient sequences may be grouped into clusters and these clusters can be used to identify patients with similar usage patterns.

FIG. 19 shows selected clusters from FIG. 18 with corresponding anomaly scores of the neurons. The selected clusters correspond to high anomaly scores. Patient 1 and Patient 2 have similar usage patterns, while Patient 3 and Patient 4 have similar usage patterns.

FIG. 20 shows determination of specific anomalies for the clusters. The logs can also store events like therapy interrupted by device or therapy interrupted by users and other therapy related events. Accordingly, once the grouping is done, the controller 200 can look back in the log and identify one or more characteristics from the log for that cluster. The controller 200 can then store the correlation between the distinct causes to these distinct patterns.

Therefore, once the network is trained, a user's device usage log can be mapped on to the trained network to identify patterns that should be addressed. In some embodiments, a personalized tailored message can be automatically sent to the user based on identified patterns. FIG. 21 illustrates example of recommendations. In some instances, device parameters and/or treatment parameters can be changed in response to detecting patterns.

In some embodiments, systems and methods as disclosed herein can be used for personalized device usage assistance. A controller configured to perform, for example, ASDA and/or ESCA functionality can analyze device usage logs, and a user provided with corrective instructions for device usage if the user's device usage is determined to be anomalous.

In some embodiments, systems and methods as disclosed herein can be used for device error prediction. A controller configured to perform, for example, ASDA and/or ESCA functionality can analyze device function logs, and a user provided with a replacement device if the device is determined to be anomalous.

In some embodiments, the rule generation engine 206 relies on calibration instructions to determine rules between features and outcomes. The rule generation engine 206 can employ machine learning modeling along with signal processing techniques to determine rules, where machine learning modeling and signal processing techniques include but are not limited to: supervised and unsupervised algorithms for regression and classification. Specific classes of algorithms include, for example, Artificial Neural Networks (Perceptron, Back-Propagation, Convolutional Neural Networks, Recurrent Neural networks, Long Short-Term Memory Networks, Deep Belief Networks), Bayesian (Naive Bayes, Multinomial Bayes and Bayesian Networks), clustering (k-means, Expectation Maximization and Hierarchical Clustering), ensemble methods (Classification and Regression Tree variants and Boosting), instance-based (k-Nearest Neighbor, Self-Organizing Maps and Support Vector Machines), regularization (Elastic Net, Ridge Regression and Least Absolute Shrinkage Selection Operator), and dimensionality reduction (Principal Component Analysis variants, Multidimensional Scaling, Discriminant Analysis variants and Factor Analysis). In some embodiments, any number of the foregoing algorithms are not included. In some embodiments, the controller 200 can use the rules to automatically determine outcomes. The controller 200 can also use the rules to control or change settings of the neurostimulation device, including but not limited to stimulation parameters (e.g., stimulation amplitude, frequency, patterned (e.g., burst stimulation), intervals, time of day, individual session or cumulative on time, and the like).

Rules can be stored in several ways, including but not limited to any number of the following: (1) After training on a cohort of data, rules could be stored in the cloud. Data would be transmitted periodically, e.g., every night, and the rules applied once data is transmitted. Changes to stimulation or results could be send back to the device or patient monitor after execution on the cloud; (2) Rules could be stored on the device or patient monitor in memory and executed on the processor. Data collected could be processed and rules applied in real time, after a measurement, or after stimulation is applied; and/or (3) Rule generation (and modification) could happen after each therapy session based on an assessment of tremor improvement and relevant features measured before, during and after each stimulation session.

In some embodiments, systems and methods incorporate automated processing and detection of abnormal patterns but do not incorporate a predefined set of error parameters.

In some embodiments, systems and methods are configured to analyze data from event logs.

In some embodiments, systems and methods are not configured to utilize physiologic measurements in detection of abnormal patterns, such as any number of EKG data, EEG data, EMG data, and the like.

In some embodiments, systems and methods are not configured to detect abnormal events indicative of intrusions to a network or device. However, intrusions can be detected in other embodiments.

Terminology

When a feature or element is herein referred to as being “on” another feature or element, it can be directly on the other feature or element or intervening features and/or elements may also be present. In contrast, when a feature or element is referred to as being “directly on” another feature or element, there are no intervening features or elements present. It will also be understood that, when a feature or element is referred to as being “connected”, “attached” or “coupled” to another feature or element, it can be directly connected, attached or coupled to the other feature or element or intervening features or elements may be present. In contrast, when a feature or element is referred to as being “directly connected”, “directly attached” or “directly coupled” to another feature or element, there are no intervening features or elements present. Although described or shown with respect to one embodiment, the features and elements so described or shown can apply to other embodiments. It will also be appreciated by those of skill in the art that references to a structure or feature that is disposed “adjacent” another feature may have portions that overlap or underlie the adjacent feature.

Terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. For example, as used herein, the singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises” and/or “comprising,” when used in this specification, specify the presence of stated features, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and/or groups thereof. As used herein, the term “and/or” includes any and all combinations of one or more of the associated listed items and may be abbreviated as “/”.

Spatially relative terms, such as “under”, “below”, “lower”, “over”, “upper” and the like, may be used herein for ease of description to describe one element or feature's relationship to another element(s) or feature(s) as illustrated in the figures. It will be understood that the spatially relative terms are intended to encompass different orientations of the device in use or operation in addition to the orientation depicted in the figures. For example, if a device in the figures is inverted, elements described as “under” or “beneath” other elements or features would then be oriented “over” the other elements or features. Thus, the exemplary term “under” can encompass both an orientation of over and under. The device may be otherwise oriented (rotated 90 degrees or at other orientations) and the spatially relative descriptors used herein interpreted accordingly. Similarly, the terms “upwardly”, “downwardly”, “vertical”, “horizontal” and the like are used herein for the purpose of explanation only unless specifically indicated otherwise.

Although the terms “first” and “second” may be used herein to describe various features/elements (including steps), these features/elements should not be limited by these terms, unless the context indicates otherwise. These terms may be used to distinguish one feature/element from another feature/element. Thus, a first feature/element discussed below could be termed a second feature/element, and similarly, a second feature/element discussed below could be termed a first feature/element without departing from the teachings of the present invention.

Throughout this specification and the claims which follow, unless the context requires otherwise, the word “comprise”, and variations such as “comprises” and “comprising” means various components can be co-jointly employed in the methods and articles (e.g., compositions and apparatuses including device and methods). For example, the term “comprising” will be understood to imply the inclusion of any stated elements or steps but not the exclusion of any other elements or steps.

As used herein in the specification and claims, including as used in the examples and unless otherwise expressly specified, all numbers may be read as if prefaced by the word “about” or “approximately,” even if the term does not expressly appear. The phrase “about” or “approximately” may be used when describing magnitude and/or position to indicate that the value and/or position described is within a reasonable expected range of values and/or positions. For example, a numeric value may have a value that is +/−0.1% of the stated value (or range of values), +/−1% of the stated value (or range of values), +/−2% of the stated value (or range of values), +/−5% of the stated value (or range of values), +/−10% of the stated value (or range of values), etc. Any numerical values given herein should also be understood to include about or approximately that value, unless the context indicates otherwise. For example, if the value “10” is disclosed, then “about 10” is also disclosed. Any numerical range recited herein is intended to include all sub-ranges subsumed therein. It is also understood that when a value is disclosed that “less than or equal to” the value, “greater than or equal to the value” and possible ranges between values are also disclosed, as appropriately understood by the skilled artisan. For example, if the value “X” is disclosed the “less than or equal to X” as well as “greater than or equal to X” (e.g., where X is a numerical value) is also disclosed. It is also understood that the throughout the application, data is provided in a number of different formats, and that this data, represents endpoints and starting points, and ranges for any combination of the data points. For example, if a particular data point “10” and a particular data point “15” are disclosed, it is understood that greater than, greater than or equal to, less than, less than or equal to, and equal to 10 and 15 are considered disclosed as well as between 10 and 15. It is also understood that each unit between two particular units are also disclosed. For example, if 10 and 15 are disclosed, then 11, 12, 13, and 14 are also disclosed.

Although various illustrative embodiments are described above, any of a number of changes may be made to various embodiments without departing from the scope of the invention as described by the claims. For example, the order in which various described method steps are performed may often be changed in alternative embodiments, and in other alternative embodiments one or more method steps may be skipped altogether. Optional features of various device and system embodiments may be included in some embodiments and not in others. Therefore, the foregoing description is provided primarily for exemplary purposes and should not be interpreted to limit the scope of the invention as it is set forth in the claims.

The examples and illustrations included herein show, by way of illustration and not of limitation, specific embodiments in which the subject matter may be practiced. As mentioned, other embodiments may be utilized and derived there from, such that structural and logical substitutions and changes may be made without departing from the scope of this disclosure. Such embodiments of the inventive subject matter may be referred to herein individually or collectively by the term “invention” merely for convenience and without intending to voluntarily limit the scope of this application to any single invention or inventive concept, if more than one is, in fact, disclosed. Thus, although specific embodiments have been illustrated and described herein, any arrangement calculated to achieve the same purpose may be substituted for the specific embodiments shown. This disclosure is intended to cover any and all adaptations or variations of various embodiments. Combinations of the above embodiments, and other embodiments not specifically described herein, will be apparent to those of skill in the art upon reviewing the above description. The methods disclosed herein include certain actions taken by a practitioner; however, they can also include any third-party instruction of those actions, either expressly or by implication. For example, actions such as “percutaneously stimulating an afferent peripheral nerve” includes “instructing the stimulation of an afferent peripheral nerve.” 

What is claimed is:
 1. A wearable neurostimulation device for transcutaneously stimulating one or more peripheral nerves of a user, the device comprising: one or more electrodes configured to generate electric stimulation signals; one or more sensors configured to detect motion signals, wherein the one or more sensors are operably connected to the wearable neurostimulation device; and one or more hardware processors configured to: receive raw signals relating to device interaction events; store the device interaction events into a data log; perform an anomalous sequence detection analysis on entries of the data log; perform an event sequence classification on entries of the data log; determine at least one of an anomaly type and/or an anomaly score; determine anomalous device function patterns or device usage patterns, wherein the anomalous device function patterns relate to determining or predicting a malfunction of the wearable neurostimulation device, and wherein the device usage patterns relate to abnormal usage of the wearable neurostimulation device by the user; communicate information related to the anomalous device function patterns or the device usage patterns to the user or a third party; wherein the device is non implantable, and wherein the anomalous sequence detection analysis comprises utilizing Markov chains.
 2. The wearable neurostimulation device of claim 1, wherein the one or more sensors are operably attached to the wearable neurostimulation device.
 3. The wearable neurostimulation device of claim 1, wherein the Markov chains comprise continuous time Markov chains.
 4. The wearable neurostimulation device of claim 1, wherein the anomalous sequence detection analysis comprises converting a time interval into a time bin on a logarithmic scale.
 5. The wearable neurostimulation device of claim 1, wherein the anomalous sequence detection analysis comprises estimating the influence of null count events on probability calculations.
 6. The wearable neurostimulation device of claim 1, further comprising one or more end effectors configured to generate stimulation signals other than electric stimulation signals.
 7. The wearable neurostimulation device of claim 6, wherein the stimulation signals other than electric stimulation signals are vibrational stimulation signals.
 8. The wearable neurostimulation device of claim 1, wherein the sensors comprise one or more of a gyroscope, accelerometer, and magnetometer.
 9. The wearable neurostimulation device of claim 1, wherein the anomalous sequence detection analysis comprises identifying a sequence of button presses.
 10. The wearable neurostimulation device of claim 1, wherein the anomalous sequence detection analysis comprises identifying patient early termination of therapy.
 11. The wearable neurostimulation device of claim 1, wherein the determining or predicting a malfunction of the wearable neurostimulation device relates to at least one of poor connection quality, sensor failure, or stimulation failure.
 12. The wearable neurostimulation device of claim 1, wherein the abnormal usage of the wearable neurostimulation device by the user relates to at least one of repetitive or excessive button or other control presses, user-initiated termination of one or more therapy sessions, or anomalous adjustment of stimulation amplitude. 